import React, { Component } from 'react' 
import {HashRouter as Router,Route} from "react-router-dom"
import Index from "./components/index/Index"
import Cart from  "./components/cart/Cart"
import Category from "./components/category/Category"
import My from "./components/my/My"
import Tabber from "./components/tabber/Tabber"
import SearchCenter from "./components/searchCenter/searchCenter"
import GoodDetail from "./components/goodDetail/GoodDetail"

export default class RouterConfig extends Component {
  render() {
    return (
      <Router>
        <Route path="/" exact render={()=><Tabber><Index></Index></Tabber>}></Route>
        <Route path="/cart" exact render={()=><Tabber><Cart></Cart></Tabber>}></Route>
        <Route path="/category" exact render={()=><Tabber><Category></Category></Tabber>}></Route>
        <Route path="/my" exact render={()=><Tabber><My></My></Tabber>}></Route>
        <Route path="/searchCenter" exact render={()=><SearchCenter></SearchCenter>}></Route>
        <Route path="/goodDetail/:goods_id" exact render={(props)=><GoodDetail {...props}></GoodDetail>}></Route>
      </Router>
    )
  }
}
